- What data does PVTA collect?
- How can we access this data?
- What do the data look like?
11/02/2015
Route information for B43: http://bustracker.pvta.com/InfoPoint/rest/routes/get/30043
In order to use this I have to know:
Route details for B43: http://bustracker.pvta.com/InfoPoint/rest/routedetails/get/30043
# library(devtools)
# install_github("umassamherst-Grid/rpvta")
library(rpvta)
getRouteDetails
## function (routeID = "all")
## {
## baseUrl <- "http://bustracker.pvta.com/InfoPoint/rest/"
## urlAppendage <- ifelse(routeID == "all", "routedetails/getallroutedetails",
## paste0("routedetails/get/", routeID))
## queryUrl <- paste0(baseUrl, urlAppendage)
## lookUp <- URLencode(queryUrl)
## dat <- rjson::fromJSON(readLines(lookUp, warn = FALSE))
## dat
## }
## <environment: namespace:rpvta>
b43details <- getRouteDetails(30043) str(b43details, 1)
## List of 20 ## $ ServerId : num 3 ## $ RouteId : num 30043 ## $ RouteRecordId : num 1 ## $ ShortName : chr "B43" ## $ LongName : chr "Northampton/Hadley/Amherst" ## $ RouteAbbreviation : chr "B43" ## $ IvrDescription : chr "Northampton Hadley Amherst" ## $ Color : chr "00467E" ## $ TextColor : chr "FFFFFF" ## $ IsVisible : logi TRUE ## $ Group : NULL ## $ SortOrder : num 13 ## $ RouteTraceFilename: chr "RouteB43.kml" ## $ RouteTraceHash64 : NULL ## $ IsHeadway : logi FALSE ## $ IncludeInGoogle : logi TRUE ## $ Stops :List of 49 ## $ RouteStops :List of 57 ## $ Directions :List of 2 ## $ Vehicles :List of 5
ls("package:rpvta")
## [1] "bindRtDeets" "busIcon" "getCurrentMessages" ## [4] "getDepartures" "getRoute" "getRouteDetails" ## [7] "getRouteID" "getStops" "getVehicles" ## [10] "getVisibleRoutes" "leafletBusLocs" "nullToNa" ## [13] "stopsToDF" "toTime" "vehicsToDf" ## [16] "visRtsToDF"
Caveats:
You can help!